<template>
  <div>
    <el-form :model="formInline" class="demo-form-inline">
      <el-form-item label="姓名：">
        <el-input
          style="width: 200px;"
          v-model="formInline.realName"
          disabled
        />
      </el-form-item>
      <el-form-item label="身份证号：">
        <el-input style="width: 200px;" v-model="formInline.iden" disabled />
      </el-form-item>
      <el-form-item label="电话：">
        <el-input style="width: 200px;" v-model="formInline.mobile" disabled />
      </el-form-item>
      <el-form-item label="地址">
        <el-input style="width: 200px;" v-model="formInline.address" disabled />
      </el-form-item>
    </el-form>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="bankCard" label="银行卡号" width="180" />
      <el-table-column prop="tname" label="银行类型" width="180" />

      <el-table-column prop="balance" label="余额" />
    </el-table>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { findUser, UserBank } from '@/api/user'

const formInline = ref({
  realName: '',
})
const tableData = ref([])

function bankUser() {
  UserBank().then(resp => {
    tableData.value = resp.data
  })
}
bankUser()
function UserInfo() {
  findUser().then(resp => {
    formInline.value = resp.data
    console.log(resp.data)
  })
}
UserInfo()
</script>

<style scoped></style>
